EmojiChooser: Check the 1st button before 1st show
authorDaniel Boles <dboles@src.gnome.org>
Sat, 2 Sep 2017 17:47:47 +0000 (18:47 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Mon, 4 Sep 2017 21:58:24 +0000 (22:58 +0100)
We scroll to the top in show() but only ever selected a button when the
adjustment changed, which doesn’t happen in init(). Check it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=787172

gtk/gtkemojichooser.c

index 9357468e1374185ec05c6d06232e6041884b76f3..8da17230f6e1b3e0632aac629f81e4f1b3e13082 100644 (file)
@@ -551,6 +551,9 @@ gtk_emoji_chooser_init (GtkEmojiChooser *chooser)
 
   populate_emoji_chooser (chooser);
   populate_recent_section (chooser);
+
+  /* We scroll to the top on show, so check the right button for the 1st time */
+  gtk_widget_set_state_flags (chooser->recent.button, GTK_STATE_FLAG_CHECKED, FALSE);
 }
 
 static void